package com.westar.core.conf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 系统常量
 */
@Configuration
@Component
public class SysConst {
    //访问的域名

    public static   String DOMAIN;


    public static Integer SCHEDULAR_MINUS;


    public static String ADMIN_ACCOUNT;


    public static String ADMIN_PASSWD;


    public static String ITEM_NAME;


    public static String AREA_ID;

    public static String AREA_NAME;

    public static String AREA_CODE;

    @Value("${dataexchange.item.host_domain}")
    public void setHost_domain(String host_domain) {
        SysConst.DOMAIN = host_domain;
    }

    @Value("${dataexchange.schedular_job.durate_minuts}")
    public void setDurate_minuts(String durate_minuts) {
        SysConst.SCHEDULAR_MINUS = Integer.parseInt(durate_minuts) ;
    }

    @Value("${dataexchange.item.admin_account}")
    public void setAdmin_account(String admin_account) {
        SysConst.ADMIN_ACCOUNT = admin_account;
    }

    @Value("${dataexchange.item.admin_passwd}")
    public void setAdmin_passwd(String admin_passwd) {
        SysConst.ADMIN_PASSWD = admin_passwd;
    }

    @Value("${dataexchange.item.name}")
    public void setITEM_NAME(String name) {
        SysConst.ITEM_NAME = name;
    }

    //上级区域主键
    @Value("${dataexchange.toparea.areaId}")
    public void setAREA_ID(String areaId) {
        SysConst.AREA_ID = areaId;
    }
    //上级区域主键
    @Value("${dataexchange.toparea.areaName}")
    public void setAREA_NAME(String areaName) {
        SysConst.AREA_NAME = areaName;
    }

    //上级区域主键
    @Value("${dataexchange.toparea.areaCode}")
    public void setAREA_CODE(String areaCode) {
        SysConst.AREA_CODE = areaCode;
    }
}
